<?php

namespace app\api\model\event;
use app\api\model\BaseModel;
use think\model\concern\SoftDelete;

class Event extends BaseModel
{
    use SoftDelete;
    protected $table = 'event';
    protected $deleteTime = 'delete_time';
    protected $autoWriteTimestamp = 'datetime';

    public function account(){
        return $this->hasOne(Account::class,'app_id','app_id')->field('app_id,name,cookie,app_token');
    }

    public function name(){
        return $this->hasOne(Account::class,'app_id','app_id')->bind(['account_name'=>'name']);
    }


}
